package com.shadow.demo.info.controller;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.shadow.demo.common.bo.R;
import com.shadow.demo.info.service.SentenceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@DS("info")
@RestController
public class InfoController {

    @Resource
    private SentenceService sentenceService;

    @GetMapping("one")
    public R one() {
        log.info("start get sentence.");
        String one = sentenceService.one();
        log.info("info result, sentence : {}", one);
        return R.success(one);
    }
}
